package com.yang.core.model;

import com.zhy.base.jpa.model.DefaultModel;
import com.zhy.base.jpa.order.OrderField;
import com.zhy.base.jpa.order.OrderModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;

/**
 * Created by xin7k
 * Date: 2019/12/2
 */
@EqualsAndHashCode(callSuper = true)
@Data
@DynamicUpdate
@DynamicInsert
@Accessors(chain = true)
@Entity(name = "qb_shop")
public class Shop extends DefaultModel {

    /**
     * 店铺拥有者ID
     */
    @Column(name = "owner_id")
    private String ownerId;

    /**
     * 店铺名字
     */
    @Column(name = "shop_name")
    private String shopName;

    /**
     * 店铺缩略图
     */
    @Column(name = "shop_image")
    private String shopImage;

    /**
     * 店铺描述
     */
    @Column(name = "shop_desc")
    private String shopDesc;


    /**
     * 店铺优先级
     */
    @OrderField(mode = OrderModel.DESC)
    @Column(name = "priority")
    private Integer priority;

}
